#! /bin/sh
patch -p1 -f -l $* < $0
exit $?

From 33c47e357b2b66e8d45ef8357bbc043ae47d4273 Mon Sep 17 00:00:00 2001
From: Andre Heinecke <aheinecke@gnupg.org>
Date: Wed, 22 Jul 2020 13:19:49 +0200
Subject: [PATCH 2/2] Gpg4win theme names and relpaths

---
 src/corelib/io/qstandardpaths_win.cpp           | 10 ++++++++++
 src/gui/image/qiconloader.cpp                   |  1 +
 src/plugins/platforms/windows/qwindowstheme.cpp | 12 ++++++++++--
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp
index c25abc3d..70d9e196 100644
--- a/src/corelib/io/qstandardpaths_win.cpp
+++ b/src/corelib/io/qstandardpaths_win.cpp
@@ -284,6 +284,16 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
         }
 #endif // !QT_BOOTSTRAPPED
     } // isConfigLocation()
+    dirs.append(QCoreApplication::applicationDirPath() + QLatin1String("/../share"));
+    if (type != GenericDataLocation && type != GenericConfigLocation) {
+        QString appData = QCoreApplication::applicationDirPath() + QLatin1String("/../share");
+        if (!QCoreApplication::organizationName().isEmpty())
+            appData += QLatin1Char('/') + QCoreApplication::organizationName();
+        if (!QCoreApplication::applicationName().isEmpty())
+            appData += QLatin1Char('/') + QCoreApplication::applicationName();
+        dirs.append(appData);
+    }
+    dirs.append(QCoreApplication::applicationDirPath() + QLatin1String("/../etc/xdg"));

     return dirs;
 }
diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp
index 15ab1b3c..e00edfad 100644
--- a/src/gui/image/qiconloader.cpp
+++ b/src/gui/image/qiconloader.cpp
@@ -174,6 +174,7 @@ QStringList QIconLoader::themeSearchPaths() const
 {
     if (m_iconDirs.isEmpty()) {
         m_iconDirs = systemIconSearchPaths();
+        m_iconDirs.append(QCoreApplication::applicationDirPath() + QLatin1String("/../share/icons"));
         // Always add resource directory as search path
         m_iconDirs.append(QLatin1String(":/icons"));
     }
diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp
index 7f47cd71..2771bc5f 100644
--- a/src/plugins/platforms/windows/qwindowstheme.cpp
+++ b/src/plugins/platforms/windows/qwindowstheme.cpp
@@ -453,12 +453,16 @@ QWindowsTheme::~QWindowsTheme()
 static inline QStringList iconThemeSearchPaths()
 {
     const QFileInfo appDir(QCoreApplication::applicationDirPath() + QLatin1String("/icons"));
-    return appDir.isDir() ? QStringList(appDir.absoluteFilePath()) : QStringList();
+    QStringList ret;
+    ret << appDir.absoluteFilePath() << QCoreApplication::applicationDirPath() + QLatin1String("/../share/icons");
+
+    return ret;
 }

 static inline QStringList styleNames()
 {
-    return { QStringLiteral("WindowsVista"), QStringLiteral("Windows") };
+    return {QStringLiteral("breeze"), QStringLiteral("oxygen"),
+            QStringLiteral("WindowsVista"), QStringLiteral("Windows") };
 }

 static inline int uiEffects()
@@ -480,6 +484,10 @@ static inline int uiEffects()
 QVariant QWindowsTheme::themeHint(ThemeHint hint) const
 {
     switch (hint) {
+    case QPlatformTheme::SystemIconThemeName:
+         return QVariant(QLatin1String("breeze"));
+    case QPlatformTheme::SystemIconFallbackThemeName:
+        return QVariant(QLatin1String("oxygen"));
     case UseFullScreenForPopupMenu:
         return QVariant(true);
     case DialogButtonBoxLayout:
--
2.20.1
